package com.skydonkey.dao;
import com.skydonkey.pojo.po.VideoJoinedActivity;
import org.apache.ibatis.annotations.*;

@Mapper
public interface VideoJoinedActivityMapper {

    @Select("SELECT * FROM video_joined_activity WHERE video_id = #{videoId} AND act_id = #{actId}")
    VideoJoinedActivity findByVideoIdAndActId(@Param("videoId") int videoId, @Param("actId") int actId);

    @Insert("INSERT INTO video_joined_activity (video_id, act_id) VALUES (#{videoId}, #{actId})")
    int insert(VideoJoinedActivity videoJoinedActivity);

    @Delete("DELETE FROM video_joined_activity WHERE video_id = #{videoId} ")
    int deleteByVideoId(@Param("videoId") Long videoId);


}
